package de.recipeminer.models.chefkoch;

import de.recipeminer.models.generic.AbstractIngredient;
import de.recipeminer.models.processing.ProcessingArtifact;
import de.recipeminer.models.processing.ProcessingPhase;

@ProcessingArtifact(processingPhase = ProcessingPhase.EXTRACTED, aggregated = false)
public class ChefkochIngredient extends AbstractIngredient {
    long id;

    public ChefkochIngredient(long id, String name) {
        super(name);
        this.id = id;
    }
    
    public long getId() {
        return id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        ChefkochIngredient that = (ChefkochIngredient) o;
        if (id != that.id) return false;
        return true;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (int) (id ^ (id >>> 32));
        return result;
    }

    public static enum Keys {
        ADDITIONAL_DESCRIPTION, BASIC, ADDITIONAL_INFO;
    }
}
